function concat_jsonl(input_files,train_file,test_file,eval_set_ratio)
    arguments
        input_files (1, :) string
        train_file (1, 1) string
        test_file (1, 1) string
        eval_set_ratio (1, 1) {mustBePositive} = 0.2
    end
    writelines("", train_file, 'WriteMode', 'overwrite');
    writelines("", test_file, 'WriteMode', 'overwrite');
    % 设置随机数种子
    rng(1895);
    for k = 1:length(input_files)
        inputs = readlines(input_files(k));
        num_inputs = numel(inputs);
        idx = randperm(num_inputs);
        train_num = floor(num_inputs*(1-eval_set_ratio));
        train_idx = idx(1:train_num);
        test_idx = idx(train_num+1:end);
        writelines(inputs(train_idx), train_file, 'WriteMode', 'append');
        writelines(inputs(test_idx), test_file, 'WriteMode', 'append');
    end
end